/*
The MIT License (MIT)

Copyright (c) 2013 Bert Wierenga

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software 
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#pragma once

#include "hhdTypes.h"
#include "hhdMatrix4.h"
#include "hhdVector4.h"
#include "hhdColor.h"

namespace hhd
{
	const uint32_t max_lights_directional	= 8;
	const uint32_t max_lights_point			= 8;
	const uint32_t max_lights_spot			= 8;

	/**
	* Represents the data for a DirectionalLight
	*/

	struct DIRECTIONAL_LIGHT
	{
		//wvp matrix for shadow map sampling
		Matrix4 _vp;

		Vector4 _direction_ws;//w memory pad

		Color _ambient_color;
		Color _diffuse_color;
		Color _specular_color;

		//stored in x, 1.0 true - 0.0 false, others are memory buffer
		Vector4 _produce_shadow_map;
	};

	/**
	* Represents the data for a PointLight
	*/
	struct POINT_LIGHT
	{
		Vector4 _position_ws;//w memory pad

		Vector4 _attenuation_coefficients;//w memory pad

		Color _ambient_color;
		Color _diffuse_color;
		Color _specular_color;

		Vector4 _fast_falloff;//stored in x,y   z,w memory pad
	};

	/**
	* Represents the data for a SpotLight
	*/
	struct SPOT_LIGHT
	{
		//wvp matrix for shadow map sampling
		Matrix4 _vp;

		Vector4 _position_ws;//w memory pad
		Vector4 _direction_ws_power_pair;

		Vector4 _attenuation_coefficients;//w memory pad

		Color _ambient_color;
		Color _diffuse_color;
		Color _specular_color;				

		Vector4 _fast_falloff;//stored in x,y   z,w memory pad

		//stored in x, 1.0 true - 0.0 false, others are memory buffer
		Vector4 _produce_shadow_map;
	};
}